TX Timing Window
Clicking Homer|TX Timing opens the TX Timing window (Fig. 19) to define the cadence with which the measurement results will be updated and transmitted via the communication interface.
Fig. 19. TX Timing window. Left: defaults, right: as in the example below.
The TX Timing window must be closed before continuing the program. You can do it using the button, the button or the standard Windows close button (´). To accept your edits, click the button. If you click the button or the Windows close button, any changes you have made will be ignored.
To restore default values for all of the settings, click the button.
Note: The value of Measurement in the PERIODICITY group of the TX Timing window is identical to the value of Period in the SIGNAL group of the Data Acquisition Setup Window.
Timing Background
In each cycle of its main program loop, the Homer checks whether an (internally generated) request to send data has arisen. There are three types of these requests: Results Ready, Results Refresh, and Motors Refresh (see below for their meaning). More than one request type can arise at the same time. The requests are registered in a specialized 8-bit variable (byte) called Request To Send register (RTS). Each request type sets a specific bit in this register as follows:
Results Ready bit 0
Results Refresh bit 1
Motors Refresh bit 2
The individual requests are enabled or rejected by comparing the (ever changing) bits of RTS against the corresponding (constant) bits of a similar register called Send Event Mask register (SEM). Bits of SEM are user-controlled by the equally named checkboxes in the SEND EVENT MASK panel of the TX Timing window. The value of SEM byte is displayed in both decimal and binary form in the header of the SEND EVENT MASK panel. The data will be transmitted when at least one of the occurring requests is enabled (mathematically, when RTS & SEM > 0, where & stands for bitwise AND operation).
The power-up value of SMR is defined by the following line in the internal Hom.cfg configuration file:
TxMask=7 ;Homer sending mask (b0=ResReady b1=TxPeriod b2=MotRefr)
The value of 7 corresponds to all three checkboxes in SEND EVENT MASK panel checked.
Results Ready
The Results Ready sending request (bit 0 of RTS) occurs after each successful measurement, i.e., normally with the periodicity of signal measurement (OnPeriod). Power-up value of OnPeriod is defined by the following line in the internal Hom.cfg configuration file:
OnPeriod_ms=0 ;Measurement cycle periodicity [ms] (0 to 65535)
In the TX Timing window, this periodicity can be defined by editing the Measurement box in the PERIODICITY panel.
The request is enabled by Results Ready checkbox.
When Results Ready is checked, a Measurement Data Object (MDO) will be sent whenever Results Ready request to send occurs. When Results Ready is unchecked, the request will be ignored.
Results Refresh
The Results Refresh sending request (bit 1 of RTS) occurs periodically with the period defined by Results Refresh edit box in the PERIODICITY panel. Its power-up value is defined by the following line in the Hom.cfg configuration file:
TxPeriod_ms=0 ;Homer sending periodicity [ms] (0 to 65535)
The request is enabled or rejected depending on the state of the Results Refresh checkbox in the SEND EVENT MASK panel as follows:
-
When the Results Refresh checkbox is checked, the last valid Measurement Data Object (MDO) will be sent whenever a Results Refresh sending requestoccurs. On sending, the Results Refresh request is cleared and the corresponding internal timer is restarted.
-
When the Results Refresh checkbox is unchecked, all sending requests of this type will be ignored.
Motors Refresh
The Motors Refresh action is meant as a sort of “heartbeat” in a case when the measurement procedure fails for any reason (there are no measurement data to send), or when the measurement cadence is very slow (Results Ready period is very long).
The Motors Refresh sending request (bit 2 of RTS) occurs periodically with the period defined by Motors Refresh edit box in the PERIODICITY panel. Its power-up value is defined by the following line in the Hom.cfg configuration file:
Mot_Refresh=1000 ;Tuner: Interval [ms] between sending motors data
The request is enabled or rejected depending on the state of the Motors Refresh checkbox in the SEND EVENT MASK panel as follows:
-
When the Motors Refresh checkbox is checked, a Measurement Data Object (MDO) will be sent whenever a Motors Refresh sending request occurs. On sending, the Motors Refresh request is cleared and the corresponding internal timer is restarted. The MDO can be of two types:
-
If measurement data are not available at the request instant, a reduced MDO containing only motors positions and status will be sent. Note that these reduced messages will be ignored in Data Logging.
-
If measurement data are available, a complete MDO will be sent.
-
-
When the Motors Refresh checkbox is unchecked, all sending requests of this type will be ignored.
The default Motors Refresh period is 1000 ms. It is unwise to set it to zero or a low value (below about 100 ms) because the communication bus could get overloaded with motors data messages.
Motors Refresh period can be alternativly defined in the Tuner|Motors Refresh menu item.
Sending Periodicity Example
To command the Homer to measure at full speed but send results only once in each 5 seconds:
-
In the PERIODICITY panel:
-
Edit the Measurement edit box to 0 (to ensure full-speed measurement).
-
Edit the Results Refresh edit box to 5000.
-
In the SEND EVENT MASK panel:
-
Uncheck the Results Ready checkbox.
-
Check the Results Refresh checkbox.
-
Uncheck the Motors Refresh checkbox.
-
Now, the TX Timing window should look like Fig. 19 (right). Click the button.
To make the Homer behave as described on its power-up, edit its internal Hom.cfg as follows:
OnPeriod_ms=0
TxPeriod_ms=5000
TxMask=2